]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell/window-tracker: Disconnect signals on disposal
authorJonas Ådahl <jadahl@gmail.com>
Fri, 24 Mar 2023 09:18:08 +0000 (10:18 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Thu, 20 Apr 2023 12:49:38 +0000 (14:49 +0200)
We always leak this, so this has no effect right now, but will in a
follow up commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2722>

src/shell-window-tracker.c

index bcd2bd4d8233f6f988923d509ff682cad0997938..50ab8f1da86b9982b2db363af677441fb5eab19a 100644 (file)
@@ -622,10 +622,12 @@ init_window_tracking (ShellWindowTracker *self)
 {
   MetaDisplay *display = shell_global_get_display (shell_global_get ());
 
-  g_signal_connect (display, "notify::focus-window",
-                    G_CALLBACK (on_focus_window_changed), self);
-  g_signal_connect(display, "window-created",
-                   G_CALLBACK (on_window_created), self);
+  g_signal_connect_object (display, "notify::focus-window",
+                           G_CALLBACK (on_focus_window_changed), self,
+                           G_CONNECT_DEFAULT);
+  g_signal_connect_object (display, "window-created",
+                           G_CALLBACK (on_window_created), self,
+                           G_CONNECT_DEFAULT);
 }
 
 static void